﻿#region license
//Copyright 2008 Ritesh Rao 

//Licensed under the Apache License, Version 2.0 (the "License"); 
//you may not use this file except in compliance with the License. 
//You may obtain a copy of the License at 

//http://www.apache.org/licenses/LICENSE-2.0 

//Unless required by applicable law or agreed to in writing, software 
//distributed under the License is distributed on an "AS IS" BASIS, 
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
//See the License for the specific language governing permissions and 
//limitations under the License. 
#endregion

namespace Rhinestone.Domain
{
    /// <summary>
    /// A generic interface to represent a user in Rhinestone.
    /// </summary>
    /// <remarks>
    /// The model doesn't concern itself of user management, membershio and role management. Instead
    /// it assumes that someother service / component, such as an identity subsustem, will take care 
    /// of this and provide an implementation of <see cref="IUser"/> that represents a valid
    /// user.
    /// </remarks>
    public interface IUser
    {
        /// <summary>
        /// Gets the unique name of the user.
        /// </summary>
        /// <remarks>
        /// Implementors of this interface must return a valid, non-null and unique value for the
        /// <see cref="Username"/> property. This property should uniquely identify the user entity.
        /// This property must be implemented.
        /// </remarks>
        string Username {get;}
        /// <summary>
        /// Gets a boolean value indicating whether the user is an administrator of Rhinestone and should
        /// have administrative access.
        /// </summary>
        /// <remarks>
        /// Implementors of this interface must return true when the user should have administrative access
        /// to Rhinestone, else return false. This property must be implemented.
        /// </remarks>
        bool IsAdministrator {get;}

        /// <summary>
        /// Gets the first name of the user.
        /// </summary>
        /// <value>string. The first name of the user.</value>
        string FirstName { get; }

        /// <summary>
        /// Gets the last name of the user.
        /// </summary>
        /// <value>string. The last name of the user.</value>
        string LastName { get; }
    }
}
